LocInfo     picLoc;


word showTool (long resID, word resFileID, word nRow, word nCol, word curTool)
{
word        qdSCB, hOrigin, hOffset, vOffset;
long        curFile;
handle      PalettePic;
Rect        *trans, theFrame;

    curFile = SetResFile2(resFileID, -1);     /* Load our picture */
    PalettePic = LoadResource(rPicture, resID);
    DetachResource(rPicture,resID);
    SetResFile1(curFile);
    (byte *) trans = (byte *) deref(PalettePic) + 2L;
    picLoc.boundsRect.v1 = trans.v1;
    picLoc.boundsRect.h1 = trans.h1;
    picLoc.boundsRect.v2 = trans.v2;
    picLoc.boundsRect.h2 = trans.h2;

    if (vMode) {
        hOrigin = 2;
        hOffset = (trans.h2/nCol);
    }
    else {
        hOrigin = 1;
        hOffset = (trans.h2/nCol);
    }
    if (p->Color == 0)
        Row = Col = 0;
    else {
        Row = curTool / nCol;
        Col = curTool % nCol;
    }
    vOffset = (trans->v2/nRow);

    theFrame.v1 = Row * vOffset;
    theFrame.h1 = hOffset * Col;
    theFrame.v2 = theFrame.v1 + vOffset + 1;
    theFrame.h2 = theFrame.h1 + hOffset + hOrigin;

    picLoc.portSCB =     ;
    picLoc.ptrToPixImage = *PalettePic;
    picLoc.width =       ;



}





struct LocInfo {
   Word portSCB; /* SCBByte in low byte */
   Pointer ptrToPixImage; /* ImageRef */
   Word width; /* Width */
   Rect boundsRect; /* BoundsRect */
} ;
typedef struct LocInfo LocInfo, *LocInfoPtr, **LocInfoHndl;
